import datetime
from pydantic import BaseModel
from typing import Optional


class ExpertiseBase(BaseModel):
    date_of_receipt_of_materials: datetime.date
    research_start_date: datetime.date
    research_end_date: datetime.date
    expert_detention_date: datetime.date
    cost_of_expertise: int
    type_expertise: str
    number_of_objects_research: int
    types_of_conclusions: Optional[str]
    text_of_conclusion: str


class ExpertiseAndId(ExpertiseBase):
    expert_id: int
    customer_id: int


class ExpertiseCreate(ExpertiseAndId):
    pass


class ExpertiseUpdate(ExpertiseAndId):
    pass


class ExpertiseRelated(ExpertiseBase):
    id: int

